package com.example.xugulink.controller;

import com.example.xugulink.model.XuGu;
import com.example.xugulink.service.IXuGuService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description: 虚谷控制器
 * @author YoungYang
 * @version 1.0
 * @date 2022/09/19 17:33:55
 */
@RestController
public class XuGuController {
  @Resource IXuGuService iXuGuService;

  @GetMapping(value = "/getData")
  public Object getXuGuData() {
    return iXuGuService.getXuGuData();
  }

  @PostMapping(value = "/updateData")
  public Object updateXuGuData(@RequestBody XuGu xuGu) {
    return iXuGuService.updateXuGuData(xuGu);
  }

  @PostMapping(value = "/insertData")
  public Object insertXuGuData(@RequestBody XuGu xuGu) {
    return iXuGuService.insertXuGuData(xuGu);
  }
  ;
}
